package com.sinoglobal.sinostore.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.sinoglobal.sinostore.R;
import com.sinoglobal.sinostore.SinoStore;
import com.sinoglobal.sinostore.StateBaseActivity;

public class MainActivity extends StateBaseActivity implements OnClickListener{

	private Button btnMyCollections;
	private Button btnMyMall;
	private Button btnFirstActivity;
	private Button btnAction;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.shop_activity_main);
		openChenJInShi();
		btnMyCollections=getViewById(R.id.btnMyCollections);
		btnMyMall=getViewById(R.id.btnMyMall);
		btnFirstActivity=getViewById(R.id.btnFirstActivity);
		btnAction = getViewById(R.id.btnAction);

		btnMyCollections.setOnClickListener(this);
		btnMyMall.setOnClickListener(this);
		btnFirstActivity.setOnClickListener(this);
		btnAction.setOnClickListener(this);
		
		SinoStore.init(getApplicationContext(), "", "", "", "", "0");
	}
	@Override
	public void onClick(View v) {
		if(v.getId()==R.id.btnMyCollections){
			Intent intent=new Intent(this,MyCollectionActivity.class);
			startActivity(intent);
		}
		else if(v.getId()==R.id.btnMyMall){
			Intent intent=new Intent(this,MyMallActivity.class);
			startActivity(intent);
		}
		else if(v.getId()==R.id.btnFirstActivity){
			Intent intent=new Intent(this,FirstActivity.class);
			startActivity(intent);
		}else if(v.getId() == R.id.btnAction){
			Intent intent=new Intent(this,ActionActivity.class);
			startActivity(intent);
		}

	}

}
